<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>
<head>
<meta name="decorator" content="moduleView" />
<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
	type="text/javascript"></script>
<script type="text/javascript" src="${staticPath}/js/list.js"></script>
<script type="text/javascript">
	function getUrl(url) {
		if (!$("#payinDetailFrame").attr("src")) {
			$("#payinDetailFrame").attr("src", url);
			$("#payinDetailFrame").attr("src", url);
		}
	}

	$(document)
			.ready(
					function() {
						$('[data-accounting]')
								.each(
										function() {
											var $this = $(this);
											if ($this
													.attr("data-accounting-precision")
													&& "" != $this
															.attr("data-accounting-precision")) {
												$this
														.html(accounting
																.formatMoney(
																		$this
																				.attr("data-accounting"),
																		"¥ ",
																		$this
																				.attr("data-accounting-precision") * 1));
											} else {
												$this
														.html(accounting
																.formatMoney(
																		$this
																				.attr("data-accounting"),
																		"¥ "));
											}
										});

					});
</script>
</head>
<body>
	<div class="Report_f">
		<div class="Report_f_1">
			<div class="Report_f_title_1">收货单明细</div>
			<div class="tab-content Report_f_title_3">
				<div class="Report_f_title_5">
					<div class="o-l-action">
						<a class="btn btn-default btn-sm btn_5 pull-right" role="button"
							href="javascript:void(0)" onclick="history.go(-1)">返回</a> <a
							class="btn btn-success btn-sm btn_5 pull-right" role="button"
							href="${contextPath}/biz/statement/statementReceiveNote/ExportDetailToExcel?id=${receiveNote.id}&billNo=${receiveNote.billNo}">导出</a>
						<a class="btn btn-primary btn-sm btn_5 pull-right btnPrint"
							role="button"
							href="${contextPath}/biz/statement/statementReceiveNote/print?id=${receiveNote.id}&billNo=${receiveNote.billNo}"
							target="_blank">打印</a>

					</div>
					<form:form name="listForm" modelAttribute="receiveNote"
						method="post" class="form-inline" role="form">
						<div class="tab-content Report_f_title_3">
							<div class="tab-pane active" id="home">
								<table class="table table-bordered">
									<tbody>
										<tr>
											<td class="text-left" style="width: 15%"><strong>验收单号:</strong></td>
											<td style="width: 35%">${receiveNote.billNo}</td>

											<td class="text-left" style="width: 15%"><strong>单据类型:</strong></td>
											<td style="width: 35%"><ossp:value
													dictType="RECEIVE_MVK_TYPE" key="${receiveNote.billType}"></ossp:value></td>
										</tr>
										<tr>
											<td class="text-left" style="width: 15%"><strong>订单号:</strong></td>
											<td style="width: 35%">${receiveNote.poNum}</td>

											<td class="text-left" style="width: 15%"><strong>收货门店:</strong></td>
											<td style="width: 35%">${receiveNote.shopName}</td>
										</tr>
										<tr>
											<td class="text-left" style="width: 15%"><strong>收货日期:</strong></td>
											<td style="width: 35%"><fmt:formatDate
													value="${receiveNote.receiptDate}" pattern="yyyy-MM-dd" /></td>

											<td class="text-left" style="width: 15%"><strong>供应商编码:</strong></td>
											<td style="width: 35%">${receiveNote.supplierNo}</td>
										</tr>
										<tr>
											<td class="text-left" style="width: 15%"><strong>供应商名称:</strong></td>
											<td style="width: 35%">${receiveNote.supplierName}</td>

											<td class="text-left" style="width: 15%"><strong>收货金额:</strong></td>
											<td style="width: 35%">${receiveNote.amount}</td>
										</tr>
									</tbody>
								</table>
							</div>
							<%-- <div class="tab-pane active" id="label_1">
								<div class="Report_f_title_4">
									<div class="f_2">
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">验收单号:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.billNo}</div>
											</div>
										</div>
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">单据类型:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">
													<ossp:value dictType="RECEIVE_MVK_TYPE"
														key="${receiveNote.billType}"></ossp:value>
												</div>
											</div>
										</div>
									</div>
									<div class="f_2">
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">订单号:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.poNum}</div>
											</div>
										</div>
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">收货门店:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.shopName}</div>
											</div>
										</div>
									</div>
									<div class="f_2">
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">收货日期:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">
													<fmt:formatDate value="${receiveNote.receiptDate}"
														pattern="yyyy-MM-dd" />
												</div>
											</div>
										</div>
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">供应商编码:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.supplierNo}</div>
											</div>
										</div>
									</div>
									<div class="f_2">
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">供应商名称:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.supplierName}</div>
											</div>
										</div>
										<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-4 control-label f_2">收货金额:</label>
											<div class="col-sm-8 f_2">
												<div class="col-sm-7 f_2">${receiveNote.amount}</div>
											</div>
										</div>
									</div>
								</div>
							</div> --%>
							<div class="o-l-search-builder f_9">
								<table
									class="table table-striped table-hover o-l-table table-bordered"
									id="table1">
									<thead class="t_1">
										<tr>
											<th>商品编码</th>
											<th>商品条码</th>
											<th>商品名称</th>
											<th>规格/型号</th>
											<th>包装率</th>
											<th>入库数量</th>
											<th>含税进价</th>
											<th>税率</th>
											<th>进价金额</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach items="${page.list}" var="statementReceiveDetail"
											varStatus="i">
											<c:if test="${i.index<(listSize-1)}">
												<tr data-herf=##
													"${contextPath}/statement/statementStock/${stock.id}/getByStockId"
							data-target="_self">
											</c:if>
											<c:if test="${i.index>=(listSize-1)}">
												<tr>
											</c:if>
											<td>${statementReceiveDetail.mantr}</td>
											<td>${statementReceiveDetail.barCode}</td>
											<td>${statementReceiveDetail.mannm}</td>
											<td>${statementReceiveDetail.goodsModel}</td>
											<td>${statementReceiveDetail.packageRt}</td>
											<td>${statementReceiveDetail.quantity}</td>
											<td><fmt:formatNumber
													value="${statementReceiveDetail.price}" pattern="##.##"
													minFractionDigits="2"></fmt:formatNumber></td>
											<td><fmt:formatNumber
													value="${statementReceiveDetail.tax}" pattern="##"
													minFractionDigits="0"></fmt:formatNumber></td>
											<td><fmt:formatNumber
													value="${statementReceiveDetail.amount}" pattern="##.##"
													minFractionDigits="2"></fmt:formatNumber></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
							<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}"
								url="" total="${page.total}" />
						</div>
					</form:form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>